package com.wy.panda.common.sign.constant;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 签名方法枚举类
 *
 * @author WangYuan
 * @since 2020年10月27日 上午10:27:56
 */
@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public enum SignMethodEnum {
	
	MD5("M1", "md5", "md5");
	
	private String code;
	
	private String name;
	
	private String desc;
	
	public static SignMethodEnum getByCode(String code) {
		SignMethodEnum result = null;
		for(SignMethodEnum item : values()) {
			if(item.getCode().equals(code)) {
				result = item;
				break;
			}
		}
		
		return result;
	}
}
